<%= form_for(@size_type) do |f| %>
<% if @size_type.errors.any? %>
<div id="error_explanation">
	<h2><%= pluralize(@size_type.errors.count, "error") %> prohibited this size_type from being saved:</h2>

	<ul>
		<% @size_type.errors.full_messages.each do |msg| %>
		<li>
			<%= msg %>
		</li>
		<% end %>
	</ul>
</div>
<% end %>

<div class="field">
	<%= f.label :name %>
	<br />
	<%= f.text_field :name %>
</div>

<div class="field">

	<%= f.fields_for :sizes do |size| %>
	<%= render 'size_fields', :f => size %>
	<% end %>

	<%= link_to_add_association 'add size', f, :sizes %>
</div>

<div class="actions">
	<%= f.submit  :class => "btn btn-default"%>
</div>
<% end %>
